﻿@using MsForgeReboot.Web.Extensions
@model IEnumerable<MsForgeReboot.Framework.Entities.UserGroup>

@{
    ViewBag.Title = "Korisničke grupe";
}

<h2>@ViewBag.Title</h2>

<p>
    @Html.ActionLink("Registruj novu korisničku grupu", "Create", null, new { @class = "btn btn-primary" })
</p>

@Html.Partial("_PagedView", Model)
<ul>
    @foreach (var item in Model) {
        <li>
            
   <div class="userGroup-listItem">
                <h3>@Html.ActionLink(item.Title, "Edit", new { urlPointer = item.UrlPointer })</h3>   
                <p class="btn-group">
                    @Html.ActionLink("Edit", "Edit", new { Area = "ControlPanel", id = item.UrlPointer }, new { @class = "btn btn-small" }) |  
                    @Html.ActionLink("View", "View", new { Area="", id=item.UrlPointer }, new { @class = "btn btn-small" }) |
                    @Html.ActionLink("Delete", "Delete", new { Area = "ControlPanel", id = item.UrlPointer }, new { name = "DeleteLink", @class = "btn btn-danger btn-small" })
                </p>
               
                <div>
                    <p>@Html.DisplaySummaryFor(item.Body) @Html.ActionLink("...", "Edit", new { urlPointer = item.UrlPointer })</p>
                </div>
            </div>
        </li>
    }
</ul>
@Html.Partial("_PagedView", Model)

<script>
    @section Scripts {
    @Scripts.Render("~/bundles/controlpanel/usergroup/index")
}</script>